import style from './style/TextDiv.module.scss'
import type { FC } from "react";


interface Props{
    title:string,
    isImg?: boolean,
    children?: string;
    
}



const TextDiv:FC<Props> = (props)=> {
    return (
        <div className={ style.titlebox}>
            <span className={style.title}>{props.title}</span>

            {props.isImg ?
                <div className={style.imgBox}>
                    <img src={(props.children)} alt="" />
                </div> :
                <span className={style.textBox}>{ props.children }</span>
            }
            
        </div>
    )
}

export default TextDiv;